<?php


 include ('peizhi.php');

    $sql="select * from orderinfo where id='".$_POST['id']."'";
	
	$re=mysql_query($sql);
	
	$re=mysql_fetch_assoc($re);
	
	
	if($re['isvideo']==1){
	
	   unlink('./images/'.$re['video']);
	
	}
	
	unlink('./images/'.$re['qingxi']);
	unlink('./images/'.$re['mohu']);
	
	$sql="delete from orderinfo where id='".$_POST['id']."'";
	
	$result=mysql_query($sql);
	
	if($result){
	
	  $sql="update tousu set status=1 where id='".$_POST['tid']."'";
	  $data=mysql_query($sql);
	  if($data){
	  
	  echo "1";
	  
	  }
	
	}else{
	
	  echo "2";
	
	}